#ifndef _EGOS_LOGGING_H_
#define _EGOS_LOGGING_H_

#include <stdio.h>
#include <stdlib.h>

// define the following 2 macros in your source file
//#define VERBOSE_LEVEL   		0 to 4
//#define ENTER_EXIT_LOGGING 	0 or 1

#if ENTER_EXIT_LOGGING == 1
  #define   ENTER( x )		x
  #define   EXIT( x )     	x
#else
  #define   ENTER( x )
  #define   EXIT( x )
#endif

// macros for the prints
#define PRINT(s)                    printf(s "\n")
#define PRINTN(s,x )                printf(s "\n", (x))
#define PRINT2N(s, x, y)            printf(s "\n", (x), (y))
#define PRINT3N(s, x, y, z)         printf(s "\n", (x), (y), (z))
#define PRINT4N(s, x, y, z, w)      printf(s "\n", (x), (y), (z), (w))
#define ASSERT(s)                   printf(s "\n")
#define ASSERTN(s, x)               printf(s "\n", (x))
#define WARN(s)                     printf(s "\n")
#define WARNN(s, x)                 printf(s "\n", (x))
#define WARN2N(s, x, y)             printf(s "\n", (x), (y))

// Verbosity levels for the prints
#ifdef VERBOSE_LEVEL

#if VERBOSE_LEVEL >= 0    // this is the default level
  #define   V0( x )     	x
#else
  #define   V0( x )
#endif

#if VERBOSE_LEVEL >= 1
  #define   V1( x )     	x
#else
  #define   V1( x )
#endif

#if VERBOSE_LEVEL >= 2
  #define   V2( x )     	x
#else
  #define   V2( x )
#endif

#if VERBOSE_LEVEL >= 3
  #define   V3( x )     	x
#else
  #define   V3( x )
#endif

#if VERBOSE_LEVEL >= 4
  #define   V4( x )     	x
#else
  #define   V4( x )
#endif

#endif //VERBOSE_LEVEL

#endif
